package lagou.homework.docker.utils;

public class Response {

    /**
     * 成功返回报文
     * @param message
     * @param data
     * @return
     */
    public static ResponseResult success(String message,Object data){
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode("200")
                .setMessage(message)
                .setData(data);
        return responseResult;
    }

    /**
     * 失败返回报文
     * @param message
     * @param o
     * @return
     */
    public static ResponseResult fail(String message,Object o){
        return new ResponseResult()
                .setCode("500")
                .setMessage(message)
                .setData(o);
    }
}
